<?php

abstract class Human{
  protected $color = 'black';
  protected abstract function earn();

  function getHairColor(){
    return $this->color;
  }
}

class Boy extends Human{
  public $rs = 500;
  function earn(){
    return $this->rs;
  }
}

$obj = new Boy;
echo $obj->earn();
echo $obj->getHairColor();
